package com.coocaa.internship.util;

import com.coocaa.internship.common.ResultCode;
import com.coocaa.internship.exception.BaseException;

/**
 * @Description: 参数校验util
 * @Author: zwh
 * @Date: 2019-07-28
 * @Time: 21:45
 */
public class ParamvalidatorUtil {

    public static void paramValidate(Object... params) {
        for (Object param : params) {
            if (param == null || param.toString().equals("")) {
                throw new BaseException(ResultCode.PARAMETER_ERROR.getCode(), ResultCode.PARAMETER_ERROR.getMessage());
            }
        }
    }
}
